home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / SINE-PUZ.dxr / 00062.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  608 b   |  20 lines

  1. on exitFrame
  2.   global CA, CB, CC
  3.   set CA to (0.5 * (random(4) - 1)) + 0.5
  4.   set CB to (0.5 * (random(5) - 1)) + 1.0
  5.   set CC to 15.0 * (random(7) - 1)
  6.   set the trails of sprite 12 to 1
  7.   set xA to the left of sprite 4 + 16
  8.   set yA to the bottom of sprite 4 - 47
  9.   set y0 to yA - (22.0 * CA * sin((CB * 0.0) + (CC * PI / 180.0)))
  10.   set x0 to xA
  11.   repeat with n = 1 to 89
  12.     set x to n * 2.0 * PI / 180.0
  13.     set x1 to (n * 2) + xA
  14.     set y1 to yA - (18.0 * CA * sin((CB * x) + (CC * PI / 180.0)))
  15.     set the locH of sprite 12 to x1
  16.     set the locV of sprite 12 to y1
  17.     updateStage()
  18.   end repeat
  19. end
  20.